#include "StdAfx.h"
#include "EventQ.h"
#include "PropChangeSupport.h"
using namespace SHGame;
using namespace SHGame::Events;
EventQ::EventQ(void)
{
	
}
void EventQ::Push(Event^ evt)
{
	//System::Diagnostics::Debug::WriteLine(evt+"", "EVENTQ Push");
	EventQ::Queue->Enqueue(evt);
}
void EventQ::AddListener(String^ s, EventHandler<PropChangeEvent^>^ h) {
	if (!listeners->ContainsKey(s)) {
		listeners->Add(s, gcnew LinkedList<EventHandler<PropChangeEvent^>^>());
	}
	listeners[s]->AddFirst(h);
}